/*
 * @Author: rock
 * @Date: 2025-04-17 11:52:09
 * @LastEditors: rock 
 * @LastEditTime: 2025-04-17 17:10:49
 * @FilePath: /004epoll/include/initsock.h
 * @Description: 
 * 
 * Copyright (c) 2025 by rock, All Rights Reserved. 
 */

#ifndef _INITSOCK_H
#define _INITSOCK_H

#include <iostream>
#include <stdio.h>
#include <ctype.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <sys/epoll.h>

#include "errstr.h"


#define IP INADDR_ANY
#define PORT 9999


/**
 * @Author: rock
 * @description: 初始化监听套接字
 * @param :[ int& lfd ]-> 服务端监听套接字
 * @return :[ ]
 */
void initsock(int& lfd);

#endif
